export default {
    namespaced: true,
	  state : {
		$userInfo:{ 
			...uni.getStorageSync('userInfo')
        }
	},
	  actions :  {
		setUserInfo(content,value){
			content.commit('SET_USERINFO',value)
		},
        
	},
	  mutations : {
		SET_USERINFO(state,value){ 
			if(typeof value == 'object'){
				for(let key in value ){
					console.log(key+':'+value[key]);
					state.$userInfo[key] = value[key]
				}
				uni.setStorageSync('userInfo',state.$userInfo)
			}
			 
			
		},
         
	},
}

 